package manager;

import model.Category;
import dao.CategoryDAO;

public class CategoryManager {
	private static CategoryManager categoryManager = new CategoryManager();
	private static CategoryDAO categoryDao = new CategoryDAO();
	private CategoryManager(){
	}
	
	public static CategoryManager getCategoryManager(){
		return categoryManager;
	}
	public static CategoryDAO getCategoryDAO(){
		return categoryDao;
	}
	
	public Category getDefaultCategory(){
		Category defaultCategory = new Category();
		defaultCategory.setName("default");
		return defaultCategory;
	}
	
	public void updateCategory(Category category){
		getCategoryDAO().save(category);
	}
	
}
